/**
 * 
 */
	function getXhr(){
		var xhr=null;
		if(window.XMLHttpRequest){
			xhr=new XMLHttpRequest();
		}else{
			xhr=new ActiveXObject('Microsoft.XMLHttp');
		}
		return xhr;
	}
	function check_user(){
		var xhr=getXhr();
		var uname=document.getElementById("uname").value;
		xhr.open("get","check_user?uname="+uname,true);
		xhr.onreadystatechange=function(){
			if(xhr.readState==4){
				if(xhr.status==200){
					var txt=xhr.responseText;
					document.getElementById("uname_msg").innerHTML=txt;
				}else{
					document.getElementById("uname_msg").innerHTML="验证出错！";
				}
			}
		};
		xhr.send(null);
	}